package logic.messagelogic;

import logic.baselogic.Database;

import java.util.StringTokenizer;

/**
 * Created by IntelliJ IDEA.
 * User: grigory.rozhkov
 * Date: 12.09.12
 * Time: 0:36
 * To change this template use File | Settings | File Templates.
 */
public class MessageHandler implements IMessageHandler{
    public String handleMessage(Database database, Message message) {
        String response = database.applyMessage(message);
        return !MessageConstants.FAILED.equals(response) ? MessageConstants.OK + response : MessageConstants.FAIL;
    }
}
